<template>
  <div>answer page</div>
  <span>listening or speaking type:{{type}}</span>
  <ul v-if="type==='speaking'">
    <li v-for="(item,index) in answerList.data" :key="index">発音ok</li>
  </ul>
  <ul v-else>
    <li v-for="(item,index) in listenList" :key="index">your choose{{item.choose}},answer{{item.isRight}}</li>
  </ul>
</template>
<script>
import { defineComponent, reactive, toRefs } from 'vue'
import answerList from '../../assets/answerList.json'
import { localGet } from '../../utils'
export default defineComponent({
  setup() {
    const state=reactive({
      type: window.localStorage.getItem("type"),
      listenList: localGet("listenList")
    })
    return {
      ...toRefs(state),
      answerList
    }
  },
})
</script>
